package com.xbang.attendance.web.action.purchase.timerole;

import com.demo2do.lighturl.annotation.Action;
import com.xbang.attendance.entity.timerole.TimeRole;
import com.xbang.attendance.service.SystemService;
import com.xbang.core.struts.support.BaseActionSupport;

public class TimeRoleManager extends BaseActionSupport {
	private TimeRole timerole;
	
	public TimeRole getTimerole() {
		return timerole;
	}

	public void setTimerole(TimeRole timerole) {
		this.timerole = timerole;
	}
	private SystemService systemService;



	@Action("/purchase/timerole/add")
	public String add() throws Exception {
		
		return "detail";
	}
	
	@Action("/purchase/timerole/save")
	public String save() throws Exception{
		if (null != timerole) {
			System.out.println(timerole.getRoleTime());
			systemService.save(timerole);
		}
		return "r:/purchase/timerole/list";
	}

	public void setSystemService(SystemService systemService) {
		this.systemService = systemService;
	}
	private Integer id;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

}
